<template>
  <div class="h5-wrapper">
    <van-tabbar v-model="active" route class="tabbar">
      <van-tabbar-item icon="notes-o" to="/hoho" class="to"
        >首页</van-tabbar-item
      >
      <van-tabbar-item icon="star-o" to="/jojo" class="to"
        >找房</van-tabbar-item
      >
      <van-tabbar-item icon="like-o" to="/lolo" class="to"
        >咨询</van-tabbar-item
      >
      <van-tabbar-item icon="friends-o" to="/xoxo" class="to"
        >我的</van-tabbar-item
      >
      <!-- <van-tabbar-item icon="friends-o" to= "/login" class="to">我的</van-tabbar-item> -->
    </van-tabbar>
    <!-- 底部tabbar - 区域 -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 0
    }
  }
}
</script>
<style>
body {
  margin: 0;
  padding: 0;
}
</style>
<style lang="less">
.h5-wrapper {
  .content {
    margin-bottom: 51px;
  }
  .tabbar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    display: flex;
    background: #fff;
    border-top: 1px solid #e4e4e4;
    .to {
      flex: 1;
      text-decoration: none;
      font-size: 14px;
      color: #333;
      -webkit-tap-highlight-color: transparent;
      &.router-link-active {
        color: #fa0;
      }
    }
  }
}
</style>
